package com.sise.controller;

import com.sise.bean.CodeMsg;
import com.sise.entity.User;
import com.sise.service.IUserService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author zj
 */
@RestController
@RequestMapping("/sise/user")
public class UserController {

    @Resource
    private IUserService userService;

    @RequestMapping("/getAllUser")
    public CodeMsg<List<User>> getAllUser() {
        return userService.getAllUser();
    }

    @RequestMapping("/updateUserById")
    public CodeMsg<String> updateUserById(User user) {
        return userService.updateUserById(user);
    }
}
